<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script></script>
</head>
<body>
<script>
  //获取浏览器参数
  function getUrlParam(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); // 构造一个含有目标参数的正则表达式对象
    var r = window.location.search.substr(1).match(reg); // 匹配目标参数
    if (r != null)
      return unescape(r[2]);
    return null; // 返回参数值
  }
  function addcookie(name, value, expireHours) {
    var cookieString = name + "=" + escape(value) + "; path=/";
    //判断是否设置过期时间
    if (expireHours > 0) {
      var date = new Date();
      date.setTime(date.getTime + expireHours * 3600 * 1000);
      cookieString = cookieString + "; expire=" + date.toGMTString();
    }
    document.cookie = cookieString;
  }
  addcookie('redpack_orderNo', getUrlParam('orderNo'));
  window.location.href = "paySuccess"
</script>
</body>
</html>